import { apiClient } from "@/utils/request";

export const fetchCourse = () => {
  return apiClient.get("/api/course");
};

export const fetchcoutsenew = (type) => {
  return apiClient.get(`/api/coutsenew?type=${type}`);
};

export const addcoutse = (data) => {
  return apiClient({
    url: `/api/addcourse`,
    method: "post",
    data: data,
  });
};
export const deletecoutse = (id) => {
  return apiClient({
    url: `/api/deletecourse/${id}`,
    method: "get",
  });
};

export const updatecoutse = (data) => {
  return apiClient({
    url: `/api/updatecourse`,
    method: "post",
    data: data,
  });
};
